
/**
 * AppleIIGo
 * Internal Memory Expansion class
 * (C) 2008 by Marc S. Ressl (mressl@umich.edu)
 * Released under the GPL
 */

#ifndef INTERNALMEMORYEXPANSION_H
#define INTERNALMEMORYEXPANSION_H

#define INTERNALMEMORYEXPANSION_BYTENUM (1 << 20)

#include "SlotDevice.h"

class InternalMemoryExpansion : public SlotDevice {
public:
	InternalMemoryExpansion(class Motherboard * motherboard,
							char * slotDeviceName);
	
	void onMemoryRequested();
	void onMemoryAllocated();
	void onResetAsserted(bool isRestart);
	
	void writeIo(UINT16 address, UINT8 value);
	UINT8 readIo(UINT16 address);
	
private:
	UINT32 ramMemoryOffset;
	UINT8 * ramMemory;
	UINT32 ramMemoryIndex;
};

#endif
